//小球反弹问题
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

bool check(ll lx, ll x)
{
	if (lx % x == 0 && (lx / x) % 2 == 0)
		return true;
	else
		return false;
}
int main()
{
	ll x = 343720;
	ll y = 233333;
	ll t = 1;
	ll lx = 0;
	ll ly = 0;
	while (1)
	{
		lx = t * 15;
		ly = t * 17;
		if (check(lx, x) && check(ly, y))
			break;

		t++;
	}
	cout << setprecision(2) << fixed;
	cout << sqrt(lx * lx + ly * ly);
	return 0;
}